<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>ECharts</title>
    <!-- 引入 echarts.js -->
    <script src="common/script/util/echarts.min.js"></script>
</head>
<body style=" width:98%;" id = "body1"  onresize="getsize()">
<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
<div id="main" style="width: 100%;height:75%;"></div>
<script src="${ctx}/common/script/jQuery/jquery-1.11.3.js"></script>
<script src="${ctx}/common/script/editor.js?v=${ggversion}"></script>

<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例


    var date = [];

    var data = []; //Math.random() * 300

    // 获取数据
    $(function(){
        $.ajax({
            url:"${ctx}/income/ajaxChartsList",
            type:'post',
            data:'',
            dataType:'json',
            success:function(income){
                console.log("${ctx}/income/ajaxChartsList");

                for (var i = 1; i < income.list.length; i++) {
                    date.push(income.list[i].fullDate);
                    data.push(income.list[i].value);
                }

                creatCharts("main");
            },
            error:function(xhr,textStatus,errorThrown){
                for (var i = 1; i < 100; i++) {
                    date.push(1);
                    data.push(1);
                }
                creatCharts("main");
            }
        });
    })

</script>

</body>
</html>